package com.ibeeking.found.workflow.api.feign;

import com.ibeeking.found.workflow.api.common.dto.EmployeeDTO;
import com.ibeeking.found.workflow.api.common.dto.SimpleEmployeeDTO;
import com.ibeeking.found.workflow.api.common.query.EmployeeFeignQuery;
import com.ibeeking.found.workflow.api.feign.fallback.FlowFileFeignBFallbackFactory;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * @Author ibeeking
 */
@FeignClient(name = "base-org-b-server", path = "/b", contextId = "flowEmployeeFeignBClient", fallbackFactory = FlowFileFeignBFallbackFactory.class, decode404 = true)
public interface FlowEmployeeFeignBClient {

    /**
     * 获取文件流
     *
     * @param query
     * @return
     */
    @PostMapping(value = "/employee/feign/v1/queryEmployeeList")
    ResponseResult<List<EmployeeDTO>> queryEmployeeList(@RequestBody EmployeeFeignQuery query);
    /**
     * 获取文件流
     *
     * @param employeeId
     * @return
     */
    @PostMapping(value = "/employee/feign/v1/queryEmployee/{employeeId}")
    ResponseResult<SimpleEmployeeDTO>  queryEmployee(@PathVariable("employeeId") Long employeeId);
}
